Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
real-require
Advanced tools
Keep require and import consistent after bundling or transpiling.
Just run:
npm install real-require
The package provides two drop-ins functions, realRequire
and realImport
, which can be used in scenarios where tools like transpilers or bundlers change the native require
or await import
calls.
The current realRequire
functions only handles webpack at the moment, wrapping the __non_webpack__require__
implementation that webpack provides for the final bundle.
// After bundling, real-require will be embedded in the bundle
const { realImport, realRequire } = require('real-require')
/*
By using realRequire, at build time the module will not be embedded and at runtime it will try to load path from the local filesytem.
This is useful in situations where the build tool does not support skipping modules to embed.
*/
const { join } = realRequire('path')
async function main() {
// Similarly, this make sure the import call is not modified by the build tools
const localFunction = await realImport('./source.js')
localFunction()
}
main().catch(console.error)
See CONTRIBUTING.md
Copyright Paolo Insogna and real-require contributors 2021. Licensed under the MIT License.
FAQs
Keep require and import consistent after bundling or transpiling
We found that real-require demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.